package com.pig4cloud.pig.village.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 村庄事件类
 * @author limbray.li
 * @date 2021/6/12
 */
@Data
@TableName("reward_event")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class RewardEvent {
	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonIgnore
	private Long id;
	@JsonIgnore
	private LocalDateTime createTime;
	@JsonIgnore
	private LocalDateTime updateTime;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	@TableLogic(value = "0", delval = "1")
	private String delFlag;
	@JsonIgnore
	private Integer tenantId;

	@ApiModelProperty(value = "任务code，可做到重复执行")
	private String scheduleCode;
	@ApiModelProperty(value = "任务的福利id")
	private Long scheduleWelfareId;
	@ApiModelProperty(value = "频次，0：月，1：年，2：次")
	private Integer timeDimension;
	@ApiModelProperty(value = "年份")
	private Integer year;
	@ApiModelProperty(value = "月份")
	private Integer month;
	@ApiModelProperty(value = "事件编号")
	private String eventNum;
	@ApiModelProperty(value = "事件概述")
	private String eventDesc;
	@ApiModelProperty(value = "时间")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime eventTime;
	@ApiModelProperty(value = "地址")
	private String address;
}